Applications use queries to access data stored in databases. Queries can be expressed in a variety of ways. Some techniques of expressing queries are more expressive than other techniques of expressing queries. For example, queries expressed in the Structured Query Language (SQL) are potentially more expressive than queries expressed in the Collaborative Application Markup Language (CAML).
In some circumstances, it may be advantageous to use a less expressive query language instead of a more expressive query language. For example, it may be more difficult to administer a first database supporting queries expressed in SQL than it is to administer a second database supporting queries expressed in CAML. In this example, the structure of the second database may be simpler than the structure of the first database and may require a less complex database management system.
Many programmers are familiar with expressive query languages, such as SQL and the Language Integrated Query (LINQ) query language. Consequently, many applications include queries expressed in a query language that is more expressive than a query language supported by a targeted database. In some circumstances, queries in an unsupported query language can be translated into one or more queries in a supported query language. However, translating a query from an unsupported query language into one or more queries in a supported query language may be computationally expensive. Moreover, executing the resulting queries in the supported query language may also be computationally expensive. In addition, there may be some queries in an unsupported query language that cannot be translated into one or more queries in a supported query language.